package xmlrpc.spring.xmlrpc.server.handler;

import com.alibaba.fastjson.JSON;
import xmlrpc.spring.xmlrpc.annotation.XmlRpcMethod;
import xmlrpc.spring.xmlrpc.annotation.XmlRpcService;


@XmlRpcService(useMethodAnnotation = true, value = "rpc")
public class RpcHandler {

    /**
    *rpc 调用的方法为rpc.handler
     */
    @XmlRpcMethod(value = "handler")
    public String handler(String cmd, Object[] params) {
        String jsonStr = JSON.toJSONString(params);
        System.out.println(jsonStr);
        return "OK";
    }
}
